﻿using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Interactivity;
using nRoute.ApplicationServices;
using nRoute.Components.Composition;
using nRoute.ViewServices;
#if (WINRT)
using Windows.UI.Xaml;
using nRoute.Behaviors.Interactivity;
using Windows.UI.Xaml.Data;
#endif

namespace nRoute.Behaviors
{
    public class ViewServiceBehavior
#if (WINRT)
        : ViewServiceBehaviorBase<FrameworkElement>
#else
        : ViewServiceBehaviorBase<UIElement>
#endif
    {

#region Properties

        [Category("Common Properties")]
        public new Type ViewServiceType
        {
            get { return base.ViewServiceType; }
            set { base.ViewServiceType = value; }
        }

        [Category("Common Properties")]
        public new string ViewServiceName
        {
            get { return base.ViewServiceName; }
            set { base.ViewServiceName = value; }
        }

        [Category("Common Properties")]
        public new bool IsDefault
        {
            get { return base.IsDefault; }
            set { base.IsDefault = value; }
        }

#if (WINRT)

        [Category("Common Properties")]
        [CustomPropertyValueEditor(CustomPropertyValueEditor.PropertyBinding)]
        public Binding ViewServiceTypeBinding
        {
            get { return GetBinding(ViewServiceTypeProperty); }
            set { SetBinding<Type>(ViewServiceTypeProperty, value); }
        }

        [Category("Common Properties")]
        [CustomPropertyValueEditor(CustomPropertyValueEditor.PropertyBinding)]
        public Binding ViewServiceNameBinding
        {
            get { return GetBinding(ViewServiceNameProperty); }
            set { SetBinding<string>(ViewServiceNameProperty, value); }
        }

        [Category("Common Properties")]
        [CustomPropertyValueEditor(CustomPropertyValueEditor.PropertyBinding)]
        public Binding IsDefaultBinding
        {
            get { return GetBinding(IsDefaultProperty); }
            set { SetBinding<bool>(IsDefaultProperty, value); }
        }

#endif

#endregion

    }
}
